<style>
.fui-goods-item .image {
    height: 6rem;
    width: 5rem;
}
.fui-goods-group {
    padding:0.3rem
}
.timer {
    font-size: .6rem;
    height: .95rem;
    color: #ef4f4f;
}
.timer span {
    display: inline-block;
    background:#582e19;
    color:#fff;
    width:.9rem;height:.9rem;
    border-radius: .1rem;
    line-height:.9rem;
    font-size:.5rem; text-align: center;
}
.radius .jy-group {border-radius:0.5rem;margin:0.35rem 0.5rem}
.radius .jy-group .fui-cell-group{border-radius:0.5rem;}
.bgfff .jy-group {background: #fff}
</style>
<div class="jy-group" style="margin-bottom:0">
	<div class="fixed-title" style="margin-top:1rem">
							 <span class="befirst spacing">
								 <span class="icon icon-fengexianzuo" style="font-size:2rem;color:#666"></span>
							 </span> 
							 <span class="title-text bold" style="color:#333;line-height:2rem"><i class="icon icon-xiai red" style="font-size:0.8rem;"></i> 精选商品</span> 
							 <span class="spacing">
								 <span class="icon icon-fengexianyou" style="font-size:2rem;color:#666"></span>
							 </span>
	</div>
	<div ng-if="pagedata.list.length>0" class="fui-goods-group no {{item.total <=0?'disabled':''}}" style="margin-top:0.3rem;padding:0;background-color:#f7f7f7">
			<div ng-repeat="item in pagedata.list" class="fui-goods-item" style="padding:0;margin:0.2rem 0;border: 0px solid #e7e7e7;">
				<div ng-click="pagedata.gotoitem(item);" ng-if="!item.video || pagedata.shopset.no_video==1" ng-class="{'image':1, 'echelon':item.active.title}" data-text="{{item.active.title}}" style="background-image: url('{{tomedia(item.image) ||'../core/resource/images/nopic.jpg'}}')">
						<div ng-show="item.total <=0" class="salez" style="background-image: url('{{tomedia(pagedata.shopset.shop.saleout)}}'); "></div>
				</div>
				<div ng-if="item.video && pagedata.shopset.no_video !=1" class="image">
					<video style="width:100%;height:100%;background:#999" controls="" x5-playsinline="" playsinline="" webkit-playsinline="" preload="auto"
						  poster="{{tomedia(item.image) || '../core/resource/images/nopic.jpg'}}"
						  data-setup='{"controls": true, "autoplay": false}'>
						  <source src="{{tomedia(item.video)}}" type="video/mp4">					 
					</video>
				</div>
				<div class="detail" style="height:2.6rem;padding-left:0.3rem;padding-top:0.2rem">
					<div ng-click="pagedata.gotoitem(item);" class="overflow-h" style="width:12rem">
							<div class="fui-tag fui-tag-danger fee-tag-zi" style="margin-right:0.15rem">{{pagedata.pluginset.saletag ||'新零售'}}</div>{{item.title}}
					</div>
					<div>
					<div ng-click="pagedata.gotoitem(item);" class="goods-tag" style="margin:0.3rem 0;color:#fff;width:12rem;padding:0.3rem 0.5rem;background: url('../addons/jy_newshopfee/resource/images/pingo.png') no-repeat 50%;background-size: cover;">
						<div style="font-size:0.65rem;line-height:1.4">原价{{item.originalprice || 0}}元，现价{{item.price || 0}}元</div>
						<div style="font-size:0.65rem;line-height:1.4">更多商品详情，请点击>></div>
					</div>
						<!--<div ng-if="pagedata.nomore_merch!=1" class="fui-tag fui-tag-danger" style="background:linear-gradient(to right,rgba(244,221,187,0.6),rgba(235,216,174,1));color:#512f0a;width:auto;font-weight:400">{{item.merchname || '平台直营'}}</div>
						<div ng-if="pagedata.nomore_merch==1" class="subtitle red" style="line-height:1">关注人数：{{item.likes}}</div>
						-->
						<div class="price syscolor" style="margin-top:0.1rem">￥ 
							<span class="text">
								<span style="font-weight:bold;font-size:1rem;">{{item.price}}</span>
								<span ng-if="!pagedata.pluginset.noweight && item.weight>0" style="color:#999;font-size:0.55rem;font-weight:400">({{item.weight}}kg)</span>
							</span>
							<span class="text r">
								<span class="subtitle" style="font-weight:400;padding-right:0.2rem;font-size:0.7rem">已售{{item.salenum || 0}}{{item.unit || '件'}}</span>
							</span>
						</div>
					</div>
				</div>
			</div>
	</div>
	<div ng-if="loading && pagedata.list.length==0" class='infinite-loading'><span class='fui-preloader'></span><span style="margin-left:1.5rem"> 正在加载...</span></div>
	<div id="showtaobaoke"  class="modal fade" tabindex="-1" style="z-index:99999;display:none;">
			<div class="modal-dialog" style="width:80%;left:10%;">
				<div class="wap-qrcode-container" style="border-radius:0.5rem;height:auto">
					<button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button>
					<p class="example1" style="padding:0.3rem;border-radius:0.5rem;margin:1rem;background:#FFFFCC">{{pagedata.copyinfo}}</p>
					<p ng-click="clip(pagedata.copyinfo)" class="example1 btn btn-sm btn-red-o">复制商品口令</p>
				</div>
			</div>
	</div>
</div>
<script>
scope.pagedata.gotoitem=function(item){
	scope.access_json('jy_weishop/goods.detail//id='+item.id);
}
scope.pagedata.addtocart=function(item){
	scope.post_json('jy_weishop/goods.detail/addtocart/',{'goodsid':item.id},function(){
		if(scope.main.menus && scope.main.menus.length>0){
			for(var i=0;i<scope.main.menus.length;i++){
				if(scope.main.menus[i].action=='jy_weishop/member.cart/'){
					scope.main.menus[i].nums++
				}
			}
		}
		scope.message('加入成功！');
		scope.$evalAsync();
	})
}
scope.pagedata.params=scope.pagedata.params?scope.pagedata.params:{};
var pcate=scope.pagedata.params.pid?scope.pagedata.params.pid:'';
var order=scope.pagedata.params.order?scope.pagedata.params.order:'';
scope.tool.get_list('jy_weishop/goods.index/getlist/order='+order+'&pcate='+pcate,true);
scope.pagedata.scroll_bottom=function(){
	scope.tool.get_list('jy_weishop/goods.index/getlist/');
}
</script>
